import request from '@/utils/request';
import { clientUrl } from '@/common/service-prefix';

export interface CompilrtParams {
  type: string;
  code: string;
}

export async function uploadCode(data: CompilrtParams) {
  return request(`${clientUrl}/online/compiler`, {
    method: 'POST',
    data: data,
  });
}
